/*** manager ***/
package util;

import java.util.ArrayList;

/** armazena os servidores e portas **/
public class Server {

  private static ArrayList<String> servers = new ArrayList<String>();

  public static void addServer(String server) {
    if((server.indexOf(':') == -1) || (servers.contains(server))) return;
    servers.add(0, server);
  }

  public static String[] getServers() {
    if(servers.isEmpty()) return new String[]{"servidores nao cadastrados"};
    return servers.toArray(new String[]{});
  }

}
